// 导入request
// 按需导出

import request from '../utils/request'
export function login (data) {
  return request({ url: 'authorizations', method: 'POST', data })
}

/**
 * 关注用户
 * @param {*} target 用户ID
 */
export function follow (target) {
  return request.post('user/followings', { target })
}

/**
 * 取关用户
 * @param {*} target 用户ID
 */
export function unFollow (target) {
  return request.delete(`user/followings/${target}`)
}
